import request from '@/utils/request'

// 查询构件库存信息列表
export function listCompWarehouseInfo(query) {
  return request({
    url: '/yard/compWarehouseInfo/list',
    method: 'get',
    params: query
  })
}

// 查询构件库存信息详细
export function getCompWarehouseInfo(id) {
  return request({
    url: '/yard/compWarehouseInfo/' + id,
    method: 'get'
  })
}

// 新增构件库存信息
export function addCompWarehouseInfo(data) {
  return request({
    url: '/yard/compWarehouseInfo',
    method: 'post',
    data: data
  })
}

// 修改构件库存信息
export function updateCompWarehouseInfo(data) {
  return request({
    url: '/yard/compWarehouseInfo',
    method: 'put',
    data: data
  })
}

// 删除构件库存信息
export function delCompWarehouseInfo(id) {
  return request({
    url: '/yard/compWarehouseInfo/' + id,
    method: 'delete'
  })
}
// 获取构件库存信息下拉
export function getProjectInfoList() {
  return request({
    url: '/Project/ProjectInfo/list?pageNum=1&pageSize=100',
    method: 'get'
  })
  
}

// 查询
export function getCompWarehouseStatistics(query) {
  return request({
    url: '/yard/compWarehouseInfo/statistics',
    method: 'get',
    params: query
  })
}
